<template>
  <div id="app">
<!--    如果不是homepage就展现自身的内容-->
    <div v-if="notHomePage(this.$route.path)">
      <router-view></router-view>
    </div>
<!--    如果是homepage相关页面就展现nav/content框架内容-->
    <div class="site-wrapper" v-else>
      <!-- mobile header -->
      <div class="mobile-header py-2 px-3 mt-4">
        <button class="menu-icon mr-2">
          <span></span>
          <span></span>
          <span></span>
        </button>
        <a href="http://extraxue.com/" class="logo"><img src="assets/head-icon.ico"
                                                         alt="Extra Xue"></a>
        <a href="http://extraxue.com/" class="site-title dot ml-2">Extra Xue</a>
      </div>
      <!--侧边导航区域-->
      <header class="left float-left shadow-dark" id="header">
        <button type="button" class="close" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <router-view name="nav"></router-view>

        <!-- navigation menu -->
        <router-view name="article_menu"></router-view>

      </header>

      <!--右边主内容区域-->
      <main class="content float-right">
        <router-view name="content"></router-view>
      </main>
    </div>
    <!-- Go to top button -->
    <a href="javascript:" id="return-to-top"><i class="fa fa-chevron-up"></i></a>
  </div>

</template>

<script>

export default {
  data(){
    return {
      // 非homepage页面
      notHomePageList : ['/image_bed']
    }
  },
  mounted() {
    window.Vue = this;
    console.log("homepage version : 2022.06.09:17")
  },

  methods:{
    // 判断是否是非homepage内容
    notHomePage(path){
      return this.notHomePageList.includes(path)
    }
  }
}

</script>

<style>
</style>
